HttpClient{ }
send{
  URI uri=null;
    uri=new URI(this.uri);
  String scheme=uri.getScheme() == null ? "http" : uri.getScheme();
  String host=uri.getHost() == null ? "localhost" : uri.getHost();
  int port=uri.getPort();
  if (port == -1) {
    if (scheme.equalsIgnoreCase("http")) {
 else     if (scheme.equalsIgnoreCase("https")) {
  if (!scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https")) {
    return;
  boolean ssl=scheme.equalsIgnoreCase("https");
  ClientBootstrap bootstrap=new ClientBootstrap(new NioClientSocketChannelFactory(Executors.newCachedThreadPool(),Executors.newCachedThreadPool()));
  bootstrap.setPipelineFactory(new HttpClientPipelineFactory(ssl));
  ChannelFuture future=bootstrap.connect(new InetSocketAddress(host,port));
  Channel channel=future.awaitUninterruptibly().getChannel();
    future.getCause().printStackTrace();
    bootstrap.releaseExternalResources();
  HttpRequest request=new DefaultHttpRequest(HttpVersion.HTTP_1_1,HttpMethod.GET,uri.getRawPath());
  request.setHeader(HttpHeaders.Names.HOST,host);
  request.setHeader(HttpHeaders.Names.CONNECTION,HttpHeaders.Values.CLOSE);
  request.setContent(outputStream.buffer());
  channel.write(request);
  channel.getCloseFuture().awaitUninterruptibly();
  bootstrap.releaseExternalResources();
}
handleError{
  log.error(msg);
  throw new HttpServerException(msg);
}
